package com.work.demo.test;/*
 *@title ProductTypeEnum
 *@description 1、数据安全调度2、多方安全计算3、可信计算沙箱4、数据安全审计5、数据生命周期保护
 *@author fulls
 *@version 1.0
 *@create 2023/11/10 17:11
 */

public enum ProductTypeEnum {

    FL_PRODUCT(1, "数据安全调度"),
    MPC_PRODUCT(2, "多方安全计算"),
    TEE_PRODUCT(3, "可信计算沙箱"),
    BLOCK_CHAIN_PRODUCT(4, "数据安全审计"),
    CYCLE_PRODUCT(5, "数据生命周期保护");

    private Integer code;
    private String msg;

    ProductTypeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static ProductTypeEnum getByCode(Integer code) {
        for (ProductTypeEnum productTypeEnum : ProductTypeEnum.values()) {
            if (productTypeEnum.code.equals(code)) {
                return productTypeEnum;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
